#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#define fill(a, c) memset(a, c, sizeof(a))
#define ldb long double
#define LL long long
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define sqr(a) ((a) * (a))
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
const ldb eps = 1e-9;
const ldb LDINF = 1e70;
const LL LINF = 1ll << 60;
const int INF = 1 << 30;
const ldb pi = fabs(atan2(0.0, -1.0));
using namespace std;

int n;
char s[1000010];

void Load()
{
	cin >> n;
	nextLine();
	gets(s);
}

vector <int> all;
int cnt[4];
vector <string> res;

void check()
{
	int mn = INF;
	int j;
	for (j = 0; j < 4; j++)
	{
		if (mn > cnt[j])
		{
			mn = cnt[j];
		}
	}
	if (cnt[0] == mn)
	{
		res.push_back("Gryffindor");
	}
	if (cnt[1] == mn)
	{
		res.push_back("Ravenclaw");
	}
	if (cnt[2] == mn)
	{
		res.push_back("Hufflepuff");
	}
	if (cnt[3] == mn)
	{
		res.push_back("Slytherin");
	}
}

void go(int i)
{	
	if (i == n)
	{
		check();
		return;
	}
	if (s[i] == '?')
	{
		int mn = INF;
		int j;
		for (j = 0; j < 4; j++)
		{
			if (mn > cnt[j])
			{
				mn = cnt[j];
			}
		}
		for (j = 0; j < 4; j++)
		{
			if (mn == cnt[j])
			{
				cnt[j]++;
				go(i + 1);
				cnt[j]--;
			}
		}
	}
	else 
	{
	   if (s[i] == 'G')
			cnt[0]++;
		else if (s[i] == 'R')
			cnt[1]++;
		else if (s[i] == 'H')
			cnt[2]++;
		else if (s[i] == 'S')
			cnt[3]++;
		go(i + 1);
		if (s[i] == 'G')
			cnt[0]--;
		else if (s[i] == 'R')
			cnt[1]--;
		else if (s[i] == 'H')
			cnt[2]--;
		else if (s[i] == 'S')
			cnt[3]--;
	}
	
}

void Solve()
{
	int i;
	for (i = 0; i < n; i++)
	{
		if (s[i] == '?')
			all.push_back(i);
	}
	reverse(all.begin(), all.end());
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'G')
			cnt[0]++;
		else if (s[i] == 'R')
			cnt[1]++;
		else if (s[i] == 'H')
			cnt[2]++;
		else if (s[i] == 'S')
			cnt[3]++;
		else if (s[i] == '?')
		{
			if (all.size() <= 12)
			{
				go(i);
				break;
			}
			else
			{
				int mn = INF;
				int j;
				for (j = 0; j < 4; j++)
				{
					if (mn > cnt[j])
					{
						mn = cnt[j];
					}
				}
				for (j = 0; j < 4; j++)
				{
					if (mn == cnt[j])
					{
						cnt[j]++;
						break;
					}
				}
				all.pop_back();
			}
		}
	}
	if (all.size() == 0)
	{
		check();	
	}
	sort(res.begin(), res.end());
	res.erase(unique(res.begin(), res.end()), res.end());
	for (i = 0; i < res.size(); i++)
	{
		cout << res[i] << "\n";
	}

}

int main()
{
#ifndef ONLINE_JUDGE
	freopen("in", "rt", stdin);
	freopen("out", "wt", stdout);
#endif
	Load();
	Solve();
	return 0;
}
